home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / binutils.7 / binutils / binutils-2.7 / gas / make-gas.com < prev    next >
Encoding:
Text File  |  1996-07-15  |  4.3 KB  |  127 lines

  1. $! Set the def dir to proper place for use in batch. Works for interactive to.
  2. $flnm = f$enviroment("PROCEDURE")     ! get current procedure name
  3. $set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
  4. $v = 'f$verify(0)'
  5. $!
  6. $!    Command file to build a GNU assembler on VMS
  7. $!
  8. $!    If you are using a version of GCC that supports global constants
  9. $!    you should remove the define="const=" from the gcc lines.
  10. $!
  11. $!    Caution:  Versions 1.38.1 and earlier had a bug in the handling of
  12. $!    some static constants. If you are using such a version of the
  13. $!    assembler, and you wish to compile without the "const=" hack,
  14. $!    you should first build this version *with* the "const="
  15. $!    definition, and then use that assembler to rebuild it without the
  16. $!    "const=" definition.  Failure to do this will result in an assembler
  17. $!    that will mung floating point constants.
  18. $!
  19. $!    Note: The version of gas shipped on the GCC VMS tapes has been patched
  20. $!    to fix the above mentioned bug.
  21. $!
  22. $    !The gcc-vms driver was modified to use `-1' quite some time ago,
  23. $    !so don't echo this text any more...
  24. $ !write sys$output "If this assembler is going to be used with GCC 1.n, you"
  25. $ !write sys$output "need to modify the driver to supply the -1 switch to gas."
  26. $ !write sys$output "This is required because of a small change in how global"
  27. $ !write sys$output "constant variables are handled.  Failure to include this"
  28. $ !write sys$output "will result in linker warning messages about mismatched
  29. $ !write sys$output "psect attributes."
  30. $!
  31. $ C_DEFS :="""VMS"""
  32. $! C_DEFS :="""VMS""","""const="""
  33. $ C_INCLUDES    = "/Include=([],[.config],[-.include],[-.include.aout])"
  34. $ C_FLAGS    = "/noVerbose/Debug" + c_includes
  35. $!
  36. $!
  37. $ on error then  goto bail
  38. $ if f$search("[-.libiberty]liberty.olb").eqs.""
  39. $ then    @[-.libiberty]vmsbuild.com
  40. $    write sys$output "Now building gas."
  41. $ endif
  42. $ if "''p1'" .eqs. "LINK" then goto Link
  43. $!
  44. $!  This helps gcc 1.nn find the aout/* files.
  45. $!
  46. $ aout_dev = f$parse(flnm,,,"DEVICE")
  47. $ tmp = aout_dev - ":"
  48. $if f$trnlnm(tmp).nes."" then aout_dev = f$trnlnm(tmp)
  49. $ aout_dir = aout_dev+f$parse(flnm,,,"DIRECTORY")' -
  50.     - "GAS]" + "INCLUDE.AOUT.]" - "]["
  51. $assign 'aout_dir' aout/tran=conc
  52. $ opcode_dir = aout_dev+f$parse(flnm,,,"DIRECTORY")' -
  53.     - "GAS]" + "INCLUDE.OPCODE.]" - "]["
  54. $assign 'opcode_dir' opcode/tran=conc
  55. $!
  56. $ set verify
  57. $!
  58. $ gcc 'c_flags'/Define=('C_DEFS') targ-cpu.c
  59. $ gcc 'c_flags'/Define=('C_DEFS') obj-format.c
  60. $ gcc 'c_flags'/Define=('C_DEFS') atof-targ.c
  61. $ gcc 'c_flags'/Define=('C_DEFS') app.c
  62. $ gcc 'c_flags'/Define=('C_DEFS') as.c
  63. $ gcc 'c_flags'/Define=('C_DEFS') atof-generic.c
  64. $ gcc 'c_flags'/Define=('C_DEFS') bignum-copy.c
  65. $ gcc 'c_flags'/Define=('C_DEFS') cond.c
  66. $ gcc 'c_flags'/Define=('C_DEFS') expr.c
  67. $ gcc 'c_flags'/Define=('C_DEFS') flonum-konst.c
  68. $ gcc 'c_flags'/Define=('C_DEFS') flonum-copy.c
  69. $ gcc 'c_flags'/Define=('C_DEFS') flonum-mult.c
  70. $ gcc 'c_flags'/Define=('C_DEFS') frags.c
  71. $ gcc 'c_flags'/Define=('C_DEFS') hash.c
  72. $ gcc 'c_flags'/Define=('C_DEFS') input-file.c
  73. $ gcc 'c_flags'/Define=('C_DEFS') input-scrub.c
  74. $ gcc 'c_flags'/Define=('C_DEFS') literal.c
  75. $ gcc 'c_flags'/Define=('C_DEFS') messages.c
  76. $ gcc 'c_flags'/Define=('C_DEFS') output-file.c
  77. $ gcc 'c_flags'/Define=('C_DEFS') read.c
  78. $ gcc 'c_flags'/Define=('C_DEFS') subsegs.c
  79. $ gcc 'c_flags'/Define=('C_DEFS') symbols.c
  80. $ gcc 'c_flags'/Define=('C_DEFS') write.c
  81. $ gcc 'c_flags'/Define=('C_DEFS') listing.c
  82. $ gcc 'c_flags'/Define=('C_DEFS') ecoff.c
  83. $ gcc 'c_flags'/Define=('C_DEFS') stabs.c
  84. $ gcc 'c_flags'/Define=('C_DEFS') sb.c
  85. $ gcc 'c_flags'/Define=('C_DEFS') macro.c
  86. $link:
  87. $!'f$verify(0)'
  88. $ set verify=(Proc,noImag)
  89. $ link/noMap/Exec=gcc-as version.opt/Opt+sys$input:/Opt
  90. !
  91. !    Linker options file for GNU assembler
  92. !
  93. targ-cpu.obj,-
  94. obj-format.obj,-
  95. atof-targ.obj,-
  96. app.obj,-
  97. as.obj,-
  98. atof-generic.obj,-
  99. bignum-copy.obj,-
  100. cond.obj,-
  101. expr.obj,-
  102. flonum-konst.obj,-
  103. flonum-copy.obj,-
  104. flonum-mult.obj,-
  105. frags.obj,-
  106. hash.obj,-
  107. input-file.obj,-
  108. input-scrub.obj,-
  109. literal.obj,-
  110. messages.obj,-
  111. output-file.obj,-
  112. read.obj,-
  113. subsegs.obj,-
  114. symbols.obj,-
  115. write.obj,-
  116. listing.obj,-
  117. ecoff.obj,-
  118. stabs.obj,-
  119. sb.obj,-
  120. macro.obj,-
  121. [-.libiberty]liberty.olb/Lib
  122. gnu_cc:[000000]gcclib.olb/Lib,sys$library:vaxcrtl.olb/Lib
  123. ! Tell linker exactly what psect attributes we want -- match VAXCRTL.
  124. psect_attr=ENVIRON,long,pic,ovr,rel,gbl,noshr,noexe,rd,wrt
  125. $!
  126. $bail: exit $status + 0*f$verify(v)    !'f$verify(0)'
  127.